<!DOCTYPE html>
<html ng-app="starter">
    <head>
        <title data-ng-bind="$state.current.data.pageTitle"></title>
        <!--<meta charset="utf-8">-->
        <!--<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">-->
        <!--<meta http-equiv="Content-Security-Policy"-->
              <!--content="default-src *;-->
              <!--style-src * 'unsafe-inline';-->
              <!--script-src * 'unsafe-inline' 'unsafe-eval';-->
              <!--img-src data: * 'unsafe-inline'" />-->

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <META HTTP-EQUIV="pragma" CONTENT="no-cache">
        <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
        <META HTTP-EQUIV="expires" CONTENT="0">
        <meta name="description" content=""/>
        <meta name="keywords" content=""/>
        <meta name="apple-mobile-web-app-capable" content="yes"/>
        <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
        <meta name="format-detection" content="telephone=no, email=no"/>
        <meta name="viewport"
              content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"/>

        <link rel="icon" href="data:;base64,=">
        <link href="lib/ionic/css/ionic.min.css" rel="stylesheet">
        <link href="lib/ionic/css/ionic.extends.popup.css" rel="stylesheet">
        <link rel="stylesheet" href="http://cache.amap.com/lbs/static/main.css?v=1.0"/>
        <link id="ng_load_plugins_before" />
    </head>

    <body ng-controller="AppController">
        <!--
          The views will be rendered in the <ion-nav-view> directive below
          Templates are in the /templates folder (but you could also
          have templates inline in this html file if you'd like).
        -->
        <ion-nav-bar align-title="center" class="bar-positive" no-tap-scroll></ion-nav-bar>
        <ion-nav-view >
        </ion-nav-view>

        <script src="lib/jquery/jquery.min.js"></script>
        <script src="lib/ionic/js/ionic.bundle.min.js"></script>
        <script src="lib/ionic/js/angular/plugins/ocLazyLoad.min.js"></script>
        <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=470035538be50c5cf7080a0aada29aad" ></script>
        <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
        <script src="lib/jquery.qrcode.js"></script>
        <!-- your app's js -->
        <script src="js/app.js"></script>
        <script src="js/services.js"></script>
        <script src="js/router.js"></script>
        <script src="js/controllers.js"></script>
        <script src="js/map.js"></script>
  </body>

  <script>
    if(document.body.clientWidth < 540){
      	(document.getElementsByTagName('html'))[0].style.fontSize = (document.body.clientWidth / 16) + 'px';
    };
    

    function getQueryString(name) {
         var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
         var r = window.location.search.substr(1).match(reg);
         if(r!=null)return  unescape(r[2]); return null;
    }
    
    //window.openId = window.getQueryString('openId');
    //window.access_token = window.getQueryString('access_token');
    
    function getCookie(name){
        var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
        if(arr=document.cookie.match(reg))
            return unescape(arr[2]);
        else
            return null;
    }
    
    window.openId = window.getCookie('openId');
    window.access_token = window.getCookie('access_token');
    
  </script>
</html>
